﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Mapa_de_Resultado
{
    public partial class fmrImpressaoMatricial : Form
    {
        private int larguraMatricial;
        public fmrImpressaoMatricial(int larguraMatricial)
        {
            this.larguraMatricial = larguraMatricial;
            InitializeComponent();
        }
        StringBuilder strDados = new StringBuilder();
        public void SetDados(string strd)
        {
            strDados.Append(strd);
        }
        private void fmrImpressaoMatricial_Load(object sender, EventArgs e)
        {
            RichTextBox1.Text = strDados.ToString();
        }

        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            Impressao imp = new Impressao();

            imp.ImprimeMatricial(strDados.ToString());
        

            MessageBox.Show("Enviado para impressora.");

        }

        private void fmrImpressaoMatricial_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == (char)Keys.Escape)
                this.Close();
        }

        private void toolStripButton2_Click(object sender, EventArgs e)
        {


        }
        private void fmrImpressaoMatricial_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.Control && e.KeyCode == Keys.P)
                toolStripButton1_Click(sender, EventArgs.Empty);
        }

        private void toolStripButton2_Click_1(object sender, EventArgs e)
        {

        }

        private void toolStripButton3_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
